#ifndef LOGIN_DIALOG_HPP
#define LOGIN_DIALOG_HPP

#include "trading_system.hpp"
#include <QDialog>
#include <QHBoxLayout>
#include <QLabel>
#include <QLineEdit>
#include <QMessageBox>
#include <QPushButton>
#include <QVBoxLayout>

class LoginDialog : public QDialog {
  Q_OBJECT

public:
  explicit LoginDialog(TradingSystem *tradingSystem, QWidget *parent = nullptr);

signals:
  void loginSuccessful();

private slots:
  void onLoginClicked();
  void onRegisterClicked();

private:
  TradingSystem *m_tradingSystem;

  QLineEdit *m_usernameEdit;
  QLineEdit *m_passwordEdit;
  QPushButton *m_loginButton;
  QPushButton *m_registerButton;
};

#endif // LOGIN_DIALOG_HPP
